var status = -1;
var selectionLog = [];

function action(d, b, a) {
    var c = cm.getMapId();
    if (c == 867201900) {
        action1(d, b, a)
    } else {
        if (c == 867201920) {
            action2(d, b, a)
        } else {
            if (c == 867201940) {
                action3(d, b, a)
            } else {
                action4(d, b, a)
            }
        }
    }
}

function action1(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(9402269, 1, -550, -574, 100);
            cm.spawnMobLimit(9402269, 1, -1434, -552, 100);
            cm.playerMessage(-1, "破坏恶心的粉红触手，诱引怪物军团。");
            cm.addPopupSay(9400580, 3000, "#face0#那下面也有！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#还有那里……", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#啊！还有那里！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face2#哈！我消灭了一个！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face4#哎？那里还有飞着的！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face4#刚才看到的那个巨大怪物是要去斯巴乐缇吗？……", "", 0);
            cm.addPopupSay(9400580, 3000, "#face3#希望……人们都能没事……", "", 0);
            cm.addPopupSay(9400580, 3000, "#face3#啊！那上面！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0##h0#，你们看到我们下面了吗……有一大批跟来了！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#我们的人气可以和明星相提并论了呢。", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0##h0#！那前面开始没有树了！", "", 0);
            cm.addPopupSay(0, 3000, "#b啊啊！跑啊，艾丽卡！", "", 0);
            cm.spawnMobLimit(9402269, 1, -1, -767, 100);
            cm.spawnMobLimit(9402269, 1, -390, -856, 100);
            cm.spawnMobLimit(9402269, 1, -1, -767, 100);
            cm.spawnMobLimit(9402269, 1, -390, -856, 100);
            cm.spawnMobLimit(9402269, 1, -1, -767, 100);
            cm.spawnMobLimit(9402269, 1, -390, -856, 100);
            cm.spawnMobLimit(9402269, 1, 833, -1004, 100);
            cm.spawnMobLimit(9402269, 1, 1238, -372, 100);
            cm.spawnMobLimit(9402269, 1, 962, -1173, 100);
            cm.spawnMobLimit(9402269, 1, 1238, -372, 100);
            cm.dispose()
        }
    }
}

function action2(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(9402269, 1, -2083, -531, 100);
            cm.spawnMobLimit(9402269, 1, -1130, -277, 100);
            cm.playerMessage(-1, "破坏恶心的粉红触手，诱引怪物军团。");
            cm.addPopupSay(9400580, 3000, "#face0#那下面也有！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#还有那里 ", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#啊！还有那里！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face2#哈！我消灭了一个！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face4#哎？那里还有飞着的！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face4#刚才看到的那个巨大怪物是要去斯巴乐缇吗？……", "", 0);
            cm.addPopupSay(9400580, 3000, "#face3#希望……人们都能没事……", "", 0);
            cm.addPopupSay(9400580, 3000, "#face3#啊！那上面！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0##h0#，你们看到我们下面了吗……有一大批跟来了！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#我们的人气可以和明星相提并论了呢。", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0##h0#！那前面开始没有树了！", "", 0);
            cm.addPopupSay(0, 3000, "#b啊啊！跑啊，艾丽卡！", "", 0);
            cm.spawnMobLimit(9402269, 1, -1222, -843, 100);
            cm.spawnMobLimit(9402269, 1, -1222, -843, 100);
            cm.spawnMobLimit(9402269, 1, -5, -961, 100);
            cm.spawnMobLimit(9402269, 1, -484, -710, 100);
            cm.spawnMobLimit(9402269, 1, -438, -1076, 100);
            cm.spawnMobLimit(9402269, 1, 965, -1114, 100);
            cm.spawnMobLimit(9402269, 1, 1799, -449, 100);
            cm.spawnMobLimit(9402269, 1, 1799, -449, 100);
            cm.dispose()
        }
    }
}

function action3(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(9402269, 1, -969, -418, 100);
            cm.playerMessage(-1, "破坏恶心的粉红触手，诱引怪物军团。");
            cm.addPopupSay(9400580, 3000, "#face0#那下面也有！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#还有那里 ", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#啊！还有那里！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face2#哈！我消灭了一个！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face4#哎？那里还有飞着的！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face4#刚才看到的那个巨大怪物是要去斯巴乐缇吗？……", "", 0);
            cm.addPopupSay(9400580, 3000, "#face3#希望……人们都能没事……", "", 0);
            cm.addPopupSay(9400580, 3000, "#face3#啊！那上面！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0##h0#，你们看到我们下面了吗……有一大批跟来了！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#我们的人气可以和明星相提并论了呢。", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0##h0#！那前面开始没有树了！", "", 0);
            cm.addPopupSay(0, 3000, "#b啊啊！跑啊，艾丽卡！", "", 0);
            cm.spawnMobLimit(9402269, 1, -374, -303, 100);
            cm.spawnMobLimit(9402269, 1, 81, -614, 100);
            cm.spawnMobLimit(9402269, 1, 619, -373, 100);
            cm.spawnMobLimit(9402269, 1, 602, -738, 100);
            cm.spawnMobLimit(9402269, 1, 1015, -646, 100);
            cm.spawnMobLimit(9402269, 1, 81, -614, 100);
            cm.spawnMobLimit(9402269, 1, 602, -738, 100);
            cm.spawnMobLimit(9402269, 1, 1015, -646, 100);
            cm.spawnMobLimit(9402269, 1, 956, -1161, 100);
            cm.spawnMobLimit(9402269, 1, 619, -373, 100);
            cm.spawnMobLimit(9402269, 1, 619, -373, 100);
            cm.dispose()
        }
    }
}

function action4(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(9402269, 1, -1892, -479, 100);
            cm.spawnMobLimit(9402269, 1, -774, -232, 100);
            cm.spawnMobLimit(9402269, 1, -1436, -532, 100);
            cm.playerMessage(-1, "破坏恶心的粉红触手，诱引怪物军团。");
            cm.addPopupSay(9400580, 3000, "#face0#那下面也有！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#还有那里 ", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#啊！还有那里！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face2#哈！我消灭了一个！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face4#哎？那里还有飞着的！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face4#刚才看到的那个巨大怪物是要去斯巴乐缇吗？……", "", 0);
            cm.addPopupSay(9400580, 3000, "#face3#希望……人们都能没事……", "", 0);
            cm.addPopupSay(9400580, 3000, "#face3#啊！那上面！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0##h0#，你们看到我们下面了吗……有一大批跟来了！", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0#我们的人气可以和明星相提并论了呢。", "", 0);
            cm.addPopupSay(9400580, 3000, "#face0##h0#！那前面开始没有树了！", "", 0);
            cm.addPopupSay(0, 3000, "#b啊啊！跑啊，艾丽卡！", "", 0);
            cm.spawnMobLimit(9402269, 1, 17, -805, 100);
            cm.spawnMobLimit(9402269, 1, -410, -949, 100);
            cm.spawnMobLimit(9402269, 1, 17, -805, 100);
            cm.spawnMobLimit(9402269, 1, -410, -949, 100);
            cm.spawnMobLimit(9402269, 1, 457, -535, 100);
            cm.spawnMobLimit(9402269, 1, 457, -535, 100);
            cm.spawnMobLimit(9402269, 1, 457, -535, 100);
            cm.spawnMobLimit(9402269, 1, 1631, -560, 100);
            cm.spawnMobLimit(9402269, 1, 1675, -120, 100);
            cm.spawnMobLimit(9402269, 1, 457, -535, 100);
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};